package com.freesky.provider.member.config.redis;

import com.freesky.common.redis.IRedisTemplate;
import com.freesky.common.redis.RedisTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import redis.clients.jedis.JedisPool;

/**
 * @author: 陈玉林
 * @modifiedBy:
 * @date: Create In 15:00 2018/11/30
 * @description:
 */
@Component
public class RedisTemplateFactory {
    @Autowired
    private   JedisPool jedisPool;

    @Bean
    public IRedisTemplate newInstance() {
        return new RedisTemplate (jedisPool);
    }

}
